var flashindex = 0;
var flashdir = "down";
var flashstate = "off";

if (document.images)
{
   smiley_ed =    new Image(64,64); smiley_ed.src =    "smiley_ed.gif";
   smiley_rick =  new Image(64,64); smiley_rick.src =  "smiley_rick.gif";
   smiley_tom =   new Image(64,64); smiley_tom.src =   "smiley_tom.gif";
   smiley_guido = new Image(64,64); smiley_guido.src = "smiley_guido.gif";

   flashpics = new Array(4);
   flashpics[0] = "smiley_ed";
   flashpics[1] = "smiley_rick";
   flashpics[2] = "smiley_tom";
   flashpics[3] = "smiley_guido";
}

function hiLite(imgObjName)
{
   if (document.images)
   {
      document.images['flashpic'].src = eval(flashpics[imgObjName] + ".src");
   }
}


function Flasher()
{
   if(flashstate == "on")
   {
      window.document.flashform.flashbtn.style.color = "#008800";
      window.document.flashform.flashbtn.value = "Start";
      flashstate = "off";
   }
   else
   {
      window.document.flashform.flashbtn.style.color = "#ee0000";
      window.document.flashform.flashbtn.value = "Stop";
      flashstate = "on";
FlashSelect();
   }

}



function FlashSelect()
{
   if(flashstate == "on")
   {
      window.document.flashform.flashfriend[flashindex].selected = true;
      hiLite(flashindex);
      setTimeout('FlashSelect2()',500);
   }
}

function FlashSelect2()
{
   if (flashdir == "down")
   {
      flashindex++;
      if (flashindex == 4)
      {
         flashindex = 2;
         flashdir = "up";
      }
      FlashSelect();
   }
   else
   {
      flashindex--;
      if (flashindex == -1)
      {
         flashindex = 1;
         flashdir = "down";
      }
      FlashSelect();
   }
}
